class smx_zookeeper {

  package { 'hadoop-zookeeper-server':
    ensure => installed,
    before => File['/etc/zookeeper/zoo.cfg'],
  }

  file { '/etc/zookeeper/zoo.cfg':
    ensure => file,
    mode   => 644, group => root, owner => root,
    source => 'puppet:///modules/smx_zookeeper/zoo.cfg',
    notify => Service['hadoop-zookeeper-server'],
  }

  service { 'hadoop-zookeeper-server' :
    ensure => running,
    enable => true,
  }
}
